<html>
  <head>
    <meta charset="utf-8">
    <title>Aincraft</title>
    <meta name="description" content="Aincraft">
    <!-- If running this example without a local copy of A-Frame, replace this next line with:
    <script src="https://aframe.io/releases/<release_number>/aframe.min.js"></script>
    -->
    <script src="../../../dist/aframe-master.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/aframe-blink-controls/dist/aframe-blink-controls.min.js"></script>
    <script src="components/random-color.js"></script>
    <script src="components/snap.js"></script>
    <script src="components/intersection-spawn.js"></script>
  </head>
  <a-scene>
    <a-assets>
      <img id="groundTexture" src="https://cdn.aframe.io/a-painter/images/floor.jpg">
      <img id="skyTexture" src="https://cdn.aframe.io/a-painter/images/sky.jpg">
      <a-mixin id="voxel"
               geometry="primitive: box; height: 0.5; width: 0.5; depth: 0.5"
               material="shader: standard"
               random-color
               snap="offset: 0.25 0.25 0.25; snap: 0.5 0.5 0.5"></a-mixin>
    </a-assets>
  
    <a-cylinder id="ground" src="#groundTexture" radius="32" height="0.1"></a-cylinder>

    <a-sky id="background" src="#skyTexture" theta-length="90" radius="30"></a-sky>

    <a-entity id="player">
      <!-- Hands -->
      <a-entity id="teleHand"
                hand-controls="hand: left"
                blink-controls="collisionEntities: [mixin='voxel'], #ground"></a-entity>
      <a-entity id="blockHand"
                hand-controls="hand: right"
                laser-controls
                raycaster="near: 0.5"
                intersection-spawn="event: click; mixin: voxel"></a-entity>

      <!-- Camera -->
      <a-camera>
        <!-- Uncomment the line below to place blocks on desktop or mobile -->
        <!-- <a-cursor intersection-spawn="event: click; mixin: voxel"></a-cursor> -->
      </a-camera>
    </a-entity>
  </a-scene>
</html>
